package com.travel.common.exception;

/**
 * @Author: LiZhenhui
 * @Date: 2018/10/18 11:54
 * @Desc:
 */
public class WorkException extends RuntimeException{

    private WorkCode workCode;

    public WorkException(WorkCode workCode){
        this.workCode = workCode;
    }

    public Integer getErrorCode(){
        return workCode.getCode();
    }

    public String getErrorMessage(){
        return workCode.getMessage();
    }

    public WorkCode getWorkCode() {
        return workCode;
    }
}
